package net.lzzy.lxq.dao;

import net.lzzy.lxq.entities.Attendance;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface AttendanceMapper {
    @Insert("insert into attendance values(#{userId},#{name},#{swipeTime},#{swipeType},#{deviceId},#{negative}," +
            "#{swipeDevice},0)")
    void add(Attendance attendance);

    @Select("select * from attendance")
    List<Attendance> getAll();

    @Select("select * from attendance where userId=#{userId}")
    List<Attendance> getUserAttendance(String userId);
}
